package com.kaifamiao.www.demo.do0807;

public class Test1 {
    public static void main(String[] args) {
        MyList list = new MyList();
        list.add("aaa");
        list.add("bbb");
        list.add("ccc");
        list.add("ddd");
        list.add("eee");
        list.add("fff");
        list.add("ggg");
        list.add("qqq");

        System.out.println(list.remove("bbb"));
        System.out.println(list.remove(3));
        System.out.println(list.indexOf("ggg"));
        System.out.println(list.lastIndexOf("ggg"));
        list.add(4,"www");
        System.out.println(list.toString());
        System.out.println(list.size());
        System.out.println(list.isEmpty());
        System.out.println(list.contains("aaa"));
        System.out.println(list.toArray());
        System.out.println(list.get(4));
        System.out.println(list.set(4, "rrr"));
        System.out.println(list.toString());
        System.out.println(list.subList(2, 5));
    }
}
